package com.lss.study.algorithm.niuke.T9;

import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

/**
 * 功能描述：
 *
 * @Date: 2022/2/19 18:21
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String newStr = "";
        for (int i = s.length() - 1; i >= 0 ; i--) {
            char c = s.charAt(i);
            if (newStr.contains(String.valueOf(c))) {
                continue;
            }else {
                newStr += c;
            }
        }
        System.out.println(newStr);
    }
}
